//
//  SSshouCangTableView.m
//  Gift
//
//  Created by Lee on 16/1/7.
//  Copyright © 2016年 Lee. All rights reserved.
//

#import "shouCangTableView.h"
#import "LTSouCangTableViewCell.h"
#import "RecommendSecondModel.h"
#import "RecommendCustomViewController.h"
@interface shouCangTableView ()

@end

@implementation shouCangTableView


-(instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style{
    self = [super initWithFrame:frame style:style];
    if ( self) {

        self.delegate = self;
        self.dataSource = self;
        self.backgroundColor = [UIColor colorWithRed:0.29 green:0.74 blue:0.8 alpha:1];
        self.alpha = 0.7;
        [self registerClass:[LTSouCangTableViewCell class] forCellReuseIdentifier:@"LTSouCangTableViewCell"];
        [self reloadData];
    }
    return self;
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return self.storageArr.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    LTSouCangTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"LTSouCangTableViewCell"];
    cell.storageModel = self.storageArr[indexPath.row];
    cell.backgroundColor = [UIColor clearColor];
    return cell;
}

- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 50 * XHIGHT;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *myid = [_storageArr[indexPath.row] joinid];
    _skipBlock(myid);
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
